<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- creator-projects-build-run-tutorial.qdoc -->
  <title>Building and Running an Example | Qt Creator Manual</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="index.html">Qt Creator Manual</a></td><td >Building and Running an Example</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="index.html">Qt Creator Manual 4.11.1</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
  <link rel="prev" href="creator-configuring.html" />
  <link rel="next" href="creator-tutorials.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="creator-configuring.html">Configuring Qt Creator</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="creator-tutorials.html">Tutorials</a>
</p><p/>
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Building and Running an Example</h1>
<span class="subtitle"></span>
<!-- $$$creator-build-example-application.html-description -->
<div class="descr"> <a name="details"></a>
<p>You can test that your Qt installation is successful by opening an existing example application project.</p>
<p>To run an example application on an Android or iOS device, you must set up the development environment for Android or iOS. For more information, see <a href="creator-developing-android.html">Connecting Android Devices</a> and <a href="creator-developing-ios.html">Connecting iOS Devices</a>.</p>
<p>To run an example application on an embedded device, you must set up Qt for Device Creation on the development host and create connections between the host and devices. For more information, see the <a href="http://doc.qt.io/QtForDeviceCreation/qtee-installation-guide.html">Installation Guide</a> in the <a href="http://doc.qt.io/QtForDeviceCreation/index.html">Qt for Device Creation</a> documentation.</p>
<ol class="1" type="1"><li>In the <b>Welcome</b> mode, select <b>Examples</b> (1).<p class="centerAlign"><img src="images/qtcreator-gs-build-example-open.png" alt="&quot;Selecting an example&quot;" /></p><p>If no examples are listed, check that a <a href="creator-project-qmake.html">Qt version</a> is installed and configured.</p>
</li>
<li>Select an example in the list of examples.<p>You can also search for examples. Enter the <b>android</b> or <b>ios</b> keyword in the search field (2) to list all the examples tested for Android or iOS. To list examples that you can run on embedded devices, enter the <b>Boot2Qt</b> keyword in the search field (commercial only).</p>
</li>
<li>To check that the application code can be compiled and linked for a device, click the <b>Kit Selector</b> and select a <a href="creator-glossary.html#glossary-buildandrun-kit">kit</a> for the device.<p class="centerAlign"><img src="images/qtcreator-gs-build-example-kit-selector.png" alt="&quot;Selecting a kit to build with&quot;" /></p><p>If you installed Qt Creator as part of a Qt installation, it should have automatically detected the installed kit. If no kits are available, see <a href="creator-targets.html">Adding Kits</a>.</p>
</li>
<li>Click <img src="images/run_small.png" alt="" /> (<b>Run</b>) to build and run the application.</li>
<li>To see the compilation progress, press <b>Alt+4</b> to open the <b>Compile Output</b> pane.<p>If build errors occur, check that a Qt version and <a href="creator-tool-chains.html">compiler</a> are installed and configured and that the necessary kits are configured. If you are building for an <a href="creator-developing-android.html">Android device</a> or <a href="creator-developing-ios.html">iOS device</a>, check that the development environment has been set up correctly.</p>
<p>The <b>Build</b> progress bar on the toolbar turns green when the project is successfully built. The application opens on the device.</p>
</li>
</ol>
</div>
<!-- @@@creator-build-example-application.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="creator-configuring.html">Configuring Qt Creator</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="creator-tutorials.html">Tutorials</a>
</p>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
